package top.ieei.demo.ftp.server;


public class FtpEntry implements java.io.Serializable
{
    /** 默认最大同时登录数 */
    public static final int DEFAULT_MAX_CONCURRENT_LOGINS = 200;
    
    /** 默认每IP最大同时登录数 */
    public static final int DEFAULT_MAX_CONCURRENT_LOGINS_PER_IP = 200;
    
    /** 默认最大下载速率(Byte/s) */
    public static final int DEFAULT_MAX_DOWNLOAD_RATE = 10000000;
    
    /** 默认最大上传速率(Byte/s) */
    public static final int DEFAULT_MAX_UPLOAD_RATE = 1000000;
    
    /** 序列化ID */
    private static final long serialVersionUID = 6381212740665293716L;
    
    /** 服务根目录 */
    private String homeDir;
    
    /** 是否有可写权限 */
    private boolean writePerm;
    
    /** 最大同时登录数 */
    private int maxConcurrentLogins = DEFAULT_MAX_CONCURRENT_LOGINS;
    
    /** 每IP最大同时登录数 */
    private int maxConcurrentLoginsPerIP = DEFAULT_MAX_CONCURRENT_LOGINS_PER_IP;
    
    /** 最大下载速率(Byte/s) */
    private int maxDownloadRate = DEFAULT_MAX_DOWNLOAD_RATE;
    
    /** 最大上传速率(Byte/s) */
    private int maxUploadRate = DEFAULT_MAX_UPLOAD_RATE;
    
    /**
     * 默认构造函数
     */
    public FtpEntry(String homeDir, boolean writePerm)
    {
        super();
        this.homeDir = homeDir;
        this.writePerm = writePerm;
    }
        
    /**
     * @return 返回 homeDir
     */
    public String getHomeDir()
    {
        return homeDir;
    }
    
    /**
     * @param 对homeDir进行赋值
     */
    public void setHomeDir(String homeDir)
    {
        this.homeDir = homeDir;
    }
    
    /**
     * @return 返回 writePerm
     */
    public boolean hasWritePerm()
    {
        return writePerm;
    }
    
    /**
     * @param 对writePerm进行赋值
     */
    public void setWritePerm(boolean writePerm)
    {
        this.writePerm = writePerm;
    }
    
    /**
     * @return 返回 maxConcurrentLogins
     */
    public int getMaxConcurrentLogins()
    {
        return maxConcurrentLogins;
    }
    
    /**
     * @param 对maxConcurrentLogins进行赋值
     */
    public void setMaxConcurrentLogins(int maxConcurrentLogins)
    {
        this.maxConcurrentLogins = maxConcurrentLogins;
    }
    
    /**
     * @return 返回 maxConcurrentLoginsPerIP
     */
    public int getMaxConcurrentLoginsPerIP()
    {
        return maxConcurrentLoginsPerIP;
    }
    
    /**
     * @param 对maxConcurrentLoginsPerIP进行赋值
     */
    public void setMaxConcurrentLoginsPerIP(int maxConcurrentLoginsPerIP)
    {
        this.maxConcurrentLoginsPerIP = maxConcurrentLoginsPerIP;
    }
    
    /**
     * @return 返回 maxDownloadRate
     */
    public int getMaxDownloadRate()
    {
        return maxDownloadRate;
    }
    
    /**
     * @param 对maxDownloadRate进行赋值
     */
    public void setMaxDownloadRate(int maxDownloadRate)
    {
        this.maxDownloadRate = maxDownloadRate;
    }
    
    /**
     * @return 返回 maxUploadRate
     */
    public int getMaxUploadRate()
    {
        return maxUploadRate;
    }
    
    /**
     * @param 对maxUploadRate进行赋值
     */
    public void setMaxUploadRate(int maxUploadRate)
    {
        this.maxUploadRate = maxUploadRate;
    }

}
